package com.qf.openapi.web.master.controller;

import com.qf.openapi.web.master.entity.User;
import com.qf.openapi.web.master.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class UserController {
    @Autowired
    UserService userService;

    /**
     * 根据用户的id查询用户  返回用户的json
     * */
    @RequestMapping("/get/{id}")
    public User getUser(@PathVariable("id") Integer id){
        return userService.getUser(id);
    }
}
